import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

// 导入页面组件
import TechSpec from '../views/TechSpec.vue'
import Help from '../views/Help.vue'
import History from '../views/History.vue'
import RDPTool from '../views/RDPTool.vue'
import APIDoc from '../views/APIDoc.vue'
import Statistics from '../views/Statistics.vue'
import Settings from '../views/Settings.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/tech-spec'
  },
  {
    path: '/tech-spec',
    name: 'TechSpec',
    component: TechSpec,
    meta: {
      title: '技术规范文档',
      icon: 'FileTextOutlined'
    }
  },
  {
    path: '/help',
    name: 'Help', 
    component: Help,
    meta: {
      title: '帮助',
      icon: 'QuestionCircleOutlined'
    }
  },
  {
    path: '/history',
    name: 'History',
    component: History,
    meta: {
      title: '历史版本',
      icon: 'HistoryOutlined'
    }
  },
  {
    path: '/rdp-tool',
    name: 'RDPTool',
    component: RDPTool,
    meta: {
      title: 'RDP工具',
      icon: 'ToolOutlined'
    }
  },
  {
    path: '/api-doc',
    name: 'APIDoc',
    component: APIDoc,
    meta: {
      title: 'API接口文档',
      icon: 'ApiOutlined'
    }
  },
  {
    path: '/statistics',
    name: 'Statistics',
    component: Statistics,
    meta: {
      title: '统计分析',
      icon: 'BarChartOutlined'
    }
  },
  {
    path: '/settings',
    name: 'Settings',
    component: Settings,
    meta: {
      title: '会议设置',
      icon: 'SettingOutlined'
    }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router